package com.house.health.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.house.health.domain.Users;
import com.house.health.mapper.UserMapper;
import com.house.health.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author DuanChangSuo
 * @date 2023/1/30 22:25
 * @description 类的描述和介绍
 **/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper,Users> implements IUserService {

    @Autowired
    private UserMapper mapper;

    @Override
    public Users login(Users user) {
        return mapper.login(user);
    }

    @Override
    public int regist(Users user) {
        return mapper.regist(user);
    }

    @Override
    public int updateUserPwd(Users users) {
        return mapper.updateUserPwd(users);
    }

    @Override
    public Users checkOldPwd(Users users) {
        return mapper.checkOldPwd(users);
    }

    public Users getByUserId(String userId) {
        return mapper.getByUserId(userId);
    }
}